任务交办SQL.txt 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --创建任务交办表
  2. create table tb_ErpShopAssignmente(
  3. ID int identity(1,1) not null,--备注ID
  4. Agt_Priority int not null,--任务优先级 0 为高 1 为中 2 为低
  5. Agt_PublishName nvarchar(20) not null,--发布人
  6. Agt_PublishTime datetime not null,--发布时间
  7. Agt_Content nvarchar(200) not null,--发布的任务内容
  8. Agt_ManageName nvarchar(20) not null,--办理人
  9. Agt_CompleteTime datetime not null,--完成时间
  10. Agt_CompleteStatus int not null,--任务的完成状态 0 为待执行 1 为执行中 2 为已完成 3 为已搁置 4 为无法完成 5 为延后
  11. Agt_Summary nvarchar(200) not null,--任务内容
  12. Agt_Revert nvarchar(200) not null,--发布者的回复
  13. Agt_CreateDatetime datetime not null,--创建的时间
  14. Agt_CreateName nvarchar(20) not null,--创建人
  15. Agt_UpdateDatetime datetime not null,--修改日期
  16. Agt_UpdateName nvarchar(20) not null--修改人
  17. )
  18. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'任务交办表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente'
  19. --EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'ID'
  20. --GO
  21. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'id'
  22. GO
  23. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'任务优先级 0 为高 1 为中 2 为低' ,
  24. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_Priority'
  25. GO
  26. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布人' ,
  27. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_PublishName'
  28. GO
  29. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布时间' ,
  30. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_PublishTime'
  31. GO
  32. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布的任务内容' ,
  33. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_Content'
  34. GO
  35. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'办理人' ,
  36. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_ManageName'
  37. GO
  38. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'完成时间' ,
  39. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_CompleteTime'
  40. GO
  41. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'任务的完成状态 0 为待执行 1 为执行中 2 为已完成 3 为已搁置 4 为无法完成 5 为延后' ,
  42. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_CompleteStatus'
  43. GO
  44. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'任务内容' ,
  45. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_Summary'
  46. GO
  47. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布者的回复' ,
  48. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_Revert'
  49. GO
  50. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建的时间' ,
  51. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_CreateDatetime'
  52. GO
  53. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' ,
  54. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_CreateName'
  55. GO
  56. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改日期' ,
  57. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_UpdateDatetime'
  58. GO
  59. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改人' ,
  60. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopAssignmente', @level2type=N'COLUMN',@level2name=N'Agt_UpdateName'
  61. GO
  62. --创建任务报告表
  63. create table tb_ErpShopDebriefing(
  64. Rpt_ID int identity(1,1) not null,--任务交办表关联
  65. Rpt_CompleteState int not null,--任务的完成状态 0 为待执行 1 为执行中 2 为已完成 3 为已搁置 4 为无法完成 5 为延后
  66. Rpt_Summary nvarchar(200) not null,--任务内容
  67. Rpt_CreateDatetime datetime not null,--创建的时间
  68. Rpt_UpdateName nvarchar(20) not null--修改人
  69. )
  70. go
  71. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'任务交办表关联' ,
  72. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopDebriefing', @level2type=N'COLUMN',@level2name=N'Rpt_ID'
  73. GO
  74. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'任务的完成状态 0 为待执行 1 为执行中 2 为已完成 3 为已搁置 4 为无法完成 5 为延后' ,
  75. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopDebriefing', @level2type=N'COLUMN',@level2name=N'Rpt_CompleteState'
  76. GO
  77. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'任务内容' ,
  78. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopDebriefing', @level2type=N'COLUMN',@level2name=N'Rpt_Summary'
  79. GO
  80. EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改人' ,
  81. @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tb_ErpShopDebriefing', @level2type=N'COLUMN',@level2name=N'Rpt_UpdateName'
  82. GO